﻿<%@ Page Language="c#" CodeBehind="ManageFlow.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DocumentFlowPages.ManageFlowPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>ManageFlow</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script type="text/javascript">
  function delete_confirm(e) {
    if (event.srcElement.outerText == "删除")
      event.returnValue = confirm("您确认要删除?");
  }
  document.onclick = delete_confirm;		
  </script>
</head>
<body>
  <form id="ManageFlow" method="post" runat="server">
  <uds:PageTitle runat="server">
    <TitlePanel>流程名：
      <asp:Label ID="labTitle" runat="server" />
    </TitlePanel>
    <RightPanel>
      <uds:RedirectButton runat="server" Text="返回" CssClass="redbuttoncss optionbutton" RedirectUrl="Listview.aspx" />
    </RightPanel>
  </uds:PageTitle>
  <uds:UDSDataGrid ID="dgStepList" runat="server" PageSize="1000" DataKeyField="ID" OnPageIndexChanged="DataGrid_PageChanged" OnDeleteCommand="MyDataGrid_Delete" OnEditCommand="MyDataGrid_Move">
    <Columns>
      <asp:BoundColumn DataField="ID" HeaderText="步骤">
        <HeaderStyle Width="8%" />
      </asp:BoundColumn>
      <asp:TemplateColumn HeaderText="名称">
        <HeaderStyle HorizontalAlign="Left" Width="48%" />
        <ItemStyle HorizontalAlign="Left" />
        <ItemTemplate>
          <a href="EditTache.aspx?FlowID=<%=FlowID%>&StepID=<%# ((FlowStep)Container.DataItem).ID %>">
            <%# HttpUtility.HtmlEncode(((FlowStep)Container.DataItem).Name) %>
          </a>
        </ItemTemplate>
        <EditItemTemplate>
        </EditItemTemplate>
      </asp:TemplateColumn>
      <asp:TemplateColumn HeaderText="流转规则">
        <HeaderStyle Width="10%" />
        <ItemTemplate>
          <%# Utility.GetEnumDisplayName(((FlowStep)Container.DataItem).FlowRule)%>
        </ItemTemplate>
        <EditItemTemplate>
          <asp:TextBox runat="server" />
        </EditItemTemplate>
      </asp:TemplateColumn>
      <asp:TemplateColumn HeaderText="人员">
        <HeaderStyle Width="8%" />
        <ItemTemplate>
          <a href="BindStaff.aspx?FlowID=<%=FlowID%>&StepID=<%# ((FlowStep)Container.DataItem).ID %>">绑定</a>
        </ItemTemplate>
      </asp:TemplateColumn>
      <asp:ButtonColumn Text="删除" HeaderText="操作" CommandName="Delete">
        <HeaderStyle Width="8%" />
      </asp:ButtonColumn>
      <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="" HeaderText="位置" CancelText="" EditText="上移">
        <HeaderStyle Width="8%" />
      </asp:EditCommandColumn>
      <asp:TemplateColumn HeaderText="分支(个)">
        <HeaderStyle Width="10%" />
        <ItemTemplate>
          <a href="EditJump.aspx?FlowID=<%=FlowID%>&StepID=<%# ((FlowStep)Container.DataItem).ID %>">分支</a>(<%# ((FlowStep)Container.DataItem).JumpCount %>)
        </ItemTemplate>
      </asp:TemplateColumn>
    </Columns>
  </uds:UDSDataGrid>
  </form>
</body>
</html>
